import http from '../utils/http/http.js'

const login = (data) => {
    return http.post("/user/login", data);
};
const getUserList = (data) => {
    return http.get("/book/list", data);
};
const saveUser = (data) => {
    return http.post("/book/save", data);
};
const delUser = (data) => {
    return http.del("/book/delete", data);
};
const getUserDetail = (data) => {
    return http.get("/book/detail", data);
};
const updateBook = (data) =>{
    return http.post("/book/update", data);
}

const importFile = (data) =>{
    return http.postFile("/book/importBook",data);
}

const  exportBook = (data)=>{
    return http.post("/book/exportBook",data);
}
export default {
    login, getUserList, saveUser, delUser, getUserDetail,updateBook,importFile,exportBook
}